<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<H1>hello world 2,我来自第二页面</H1>
<button onclick="post()">发送消息</button>
<script type="text/javascript">
    function post(){
        top.postMessage("来自子页面的消息","http://localhost:8081")
    }
</script>
</body>
</html>